package com.CmJava.controller;

import com.CmJava.entity.ResultEntity;
import com.CmJava.utils.DownUtil;
import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.URLEncoder;

@Controller
public class DownController {

    // 下载俄罗斯方块
    @RequestMapping("downBlockVs")
    public ResultEntity downBlockVs(HttpServletResponse response) {
        DownUtil.downFileInsideJar(response);
        return null;
    }

}
